home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / shell / ncd-0.000 / ncd-0 / ncd-0.9.8 / glob.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-04  |  2.1 KB  |  60 lines

  1. #include <stdio.h> 
  2. #include <dirent.h>
  3.  
  4. #define GLOBAL_DEF
  5.  
  6. #include "ncd.h"
  7.                                  
  8. #undef GLOBAL_DEF
  9.  
  10. /*************************************************************************/
  11. /* global configuration */
  12.  
  13. int _rebuild = 0;    /* 0=no,  1=rebuild */
  14. int _scope = 0;        /* 0=by actual location, 1=full, -1=home */
  15. int _rebauto = 1;    /* 0=manual, 1=automatic */
  16. int _verbose = 0;    /* 0=quiet,  1=verbose */
  17. int _justdump = 0;    /* 0=norma, 1=just dump tree */
  18. int _lineart = 2;    /* 1=lineart, 0=normal chars, 2=auto */
  19. int _showlink = 0;    /* 0=ldir@  1=ldir -> dir */
  20.  
  21. /*************************************************************************/
  22. /* other global variables */
  23.  
  24. char _home[PATH_MAX];    /* home dir (perhaps is a soft link...) */
  25. char _xhome[PATH_MAX];    /* home dir (physical directory) */
  26. char _cwd[PATH_MAX];    /* current working directory */
  27. char _root[PATH_MAX];    /* 'root' directory: / or HOME */
  28. char _xroot[PATH_MAX];    /* 'xroot' directory: / or xhome */
  29. char _finalDir[PATH_MAX];  /* final selected path */
  30. char _argumentDir[PATH_MAX];  /* command line argument: dir */
  31.  
  32. char _homeFile[PATH_MAX];    /* home tree file */
  33. char _fullFile[PATH_MAX];    /* full tree file */
  34. char _selDirFile[PATH_MAX];    /* file for selected dir */
  35.  
  36. DirNode *_rootNode;        /* xroot node */
  37. DirNode *_lastNode;     /* last node in the tree */
  38. int _nLinks;            /* number of recursive links processed */
  39.  
  40. char _searchPath[PATH_MAX];        /* direct scan path */
  41. int _searchPLen;   /* _searchPath last length */
  42. int _searchPX;   /* line editor horizontal position */
  43.  
  44. int _x0, _y0;    /* top left corner coords. */
  45. DirNode *_curNode;    /* currently selected node */
  46.  
  47. int _cols;    /* screen COLS */
  48. int _lines;        /* screen LINES */
  49. int _use_color;        /* != 0 to use colors */
  50. int _cursesOn;    /* != if curses has initialized display */
  51.  
  52. /* refresh flags, for optimized display */
  53. /* != 0 if must be repainted */
  54. int _refCurrent;     /* current cursor line */
  55. int _refRest;        /* rest of lines */
  56. int _refCurDir;      /* current directory field */
  57. int _refSearch;      /* search editor line */
  58.  
  59. /*************************************************************************/
  60.